package com.nidu.demo.web.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "cola.web")
public class WebProperties {

    private Api appApi;

    private Api adminApi;

    private String basePackage;

    private String adminUrl;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Api {

        /**
         * API 前缀，实现所有 Controller 提供的 RESTFul API 的统一前缀
         */
        private String prefix;

        /**
         * Controller 所在包的 Ant 路径规则
         */
        private String controller;

    }
}